function _reduce(arr, callback, initialVale) {

    let accumulator = initialVale === undefined ? arr[0] : initialVale

    for (let i = accumulator === undefined ? 1 : 0; i < arr.length; i++) {
        accumulator = callback(accumulator, arr[i], i, arr)
    }

    return accumulator
}